package com.libary.dao.Impl;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
import org.springframework.stereotype.Repository;

import com.libary.dao.IUserDao;
import com.libary.dto.User;
@Repository
public class UserDaoImpl extends SqlMapClientDaoSupport implements IUserDao {

	@Override
	public boolean loginCheck(User user) {
		return (Integer)getSqlMapClientTemplate().queryForObject("LIBARY_USER.checkUser", user) == 1 ? true : false;
	}

	@Override
	public User getUserInfo(User loginUser) {
		return (User)getSqlMapClientTemplate().queryForObject("LIBARY_USER.getUserInfo",loginUser);
	}
	

}
